package com.qing.mapper;

import com.qing.pojo.Leave;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author qinghua
 * @since 2022-06-06
 */
@Mapper
public interface LeaveMapper extends BaseMapper<Leave> {

    /**
     * 查询所有员工的请假记录
     * @return {@link List< Map< String, Object>> }
     */
    List<Map<String, Object>> queryAllAndName();

    /**
     * 查询某个员工的请假记录
     * @param employeeId  员工id
     * @return {@link List< Map< String, Object>> }
     */
    List<Map<String, Object>> queryAllAndNameByEmployeeId(@Param("employeeId") Integer employeeId);

    List<Leave> queryToday();

}
